package com.wudl.govern.service.impl;

import com.wudl.govern.domain.MetaForeignkeyHistory;
import com.wudl.govern.mapper.MetaForeignkeyHistoryMapp;
import com.wudl.govern.service.MetaForeignkeyHistoryService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * meta_foreignkey_history Service
 *
 * @author wudl
 */
@Service
public class MetaForeignkeyHistoryServiceImpl implements MetaForeignkeyHistoryService {

    @Autowired
    private MetaForeignkeyHistoryMapp metaForeignkeyHistoryMapp;

    /**
     * 分页查询
     */
    @Override
    public  List<MetaForeignkeyHistory> page(Integer page, Integer size) {
        PageHelper.startPage(page, size);
        return  metaForeignkeyHistoryMapp.selectList();
    }

    /**
     * 获取
     */
    @Override
    public MetaForeignkeyHistory getById(Integer id) {
        return metaForeignkeyHistoryMapp.selectById(id);
    }

    /**
     * 保存
     */
    @Override
    public void save(MetaForeignkeyHistory metaForeignkeyHistory) {
        metaForeignkeyHistoryMapp.insert(metaForeignkeyHistory);
    }

    /**
     * 更新
     */
    @Override
    public void updateById(MetaForeignkeyHistory metaForeignkeyHistory) {
        metaForeignkeyHistoryMapp.updateById(metaForeignkeyHistory);
    }

    /**
     * 删除
     */
    @Override
    public void removeById(Integer id) {
        metaForeignkeyHistoryMapp.deleteById(id);
    }

}